package com.pengshun.modules.api.user.para;

import com.pengshun.modules.api.coal.validator.Fifth;
import com.pengshun.modules.api.coal.validator.First;
import com.pengshun.modules.api.coal.validator.Fourth;
import com.pengshun.modules.api.coal.validator.Second;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author luoligang
 * @create 2021/2/4
 */
@Data
public class RunningWaterPara {


    @NotNull(message = "page不能为空", groups = {First.class, Fourth.class})
    private  Integer page;

    @NotNull(message = "size不能为空", groups = {First.class,Fourth.class})
    private  Integer size;

    @NotNull(message = "状态不能为空", groups = {Fourth.class})
    private  Integer status;

    private Long  userId;
    @NotNull(message = "incomeRecordId能为空", groups = {Second.class})
    private Long  incomeRecordId;


    @NotNull(message = "状态不能为空", groups = {Fifth.class})
    private Long  id;

    public Integer getPage() {
        int pg=this.page*this.size;
        return pg;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
}
